﻿using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using JJY.DBUtility;

namespace Lottery.DBUtility
{
    public class LotterySQLHelper : SQLHelper
    {
        public static int ExecuteNonQuery(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)
        {
            using (SqlConnection conn = new SqlConnection(LotteryApplicationVariable.ConnectionString))
            {
                return ExecuteNonQuery(conn, cmdType, cmdText, commandParameters);
            }
        }

        public static object ExecuteScalar(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)
        {
            using (SqlConnection conn = new SqlConnection(LotteryApplicationVariable.ConnectionString))
            {
                return ExecuteScalar(conn, cmdType, cmdText, commandParameters);
            }
        }
    }
}